package com.atguigu.config;

import com.atguigu.bean.Fruit;
import org.springframework.beans.factory.FactoryBean;

public class FruitFactoryBean implements FactoryBean<Fruit> {
    @Override
    public Fruit getObject() throws Exception {
        System.out.println("create Fruit");
        return new Fruit();
    }

    @Override
    public Class<?> getObjectType() {
        return Fruit.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
